package com.ruoyi.datastatistics.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import com.ruoyi.common.annotation.Excel;

/**
 * 大表时用量对象 t_hour_usage_db
 *
 * @author TsingYu
 * @date 2024-08-05
 */
@TableName("t_hour_usage_db")
@Data
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HourUsageDb implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 终端id
     */
    @TableField(exist = false)
    private String terminalId;
    /**
     * locationNb
     */
    @TableField("location_nb")
    private String locationNb;
    /**
     * 终端名称
     */
    @Excel(name = "终端名称")
    @TableField("terminal_name")
    private String terminalName;

    /**
     * 出厂编号
     */
    @Excel(name = "出厂编号")
    @TableField("factory_number")
    private String factoryNumber;

    /**
     * 区域id
     */
    @Excel(name = "区域id")
    @TableField("sheets_id")
    private Long sheetsId;

    /**
     * 区域代码
     */
    @Excel(name = "区域代码")
    @TableField("sheets_code")
    private String sheetsCode;

    /**
     * 区域名称
     */
    @Excel(name = "区域名称")
    @TableField("sheets_name")
    private String sheetsName;

    /**
     * 用量
     */
    @Excel(name = "用量")
    @TableField("usage")
    private BigDecimal usage;

    /**
     * 使用小时段
     */
    @TableField("usage_hour")
    private Integer usageHour;

    /**
     * 使用日期
     */
    @TableField("usage_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date usageDate;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @Override
    public boolean equals(Object o) {
        // 禁止删除或改动此处代码
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        HourUsageDb that = (HourUsageDb) o;
        return Objects.equals(locationNb, that.locationNb) && Objects.equals(terminalName, that.terminalName) && Objects.equals(factoryNumber, that.factoryNumber) && Objects.equals(sheetsId, that.sheetsId) && Objects.equals(sheetsCode, that.sheetsCode) && Objects.equals(sheetsName, that.sheetsName);
    }

    @Override
    public int hashCode() {
        // 禁止删除或改动此处代码
        return Objects.hash(locationNb, terminalName, factoryNumber, sheetsId, sheetsCode, sheetsName);
    }
}
